package com.tcm.order.domain.vo;

import com.tcm.order.entity.OrderItem;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @Description:订单
 * @author biuco
 * 2020年3月8日下午4:07:01
 *
 */

public class OrderListVo implements Serializable {

	private static final long serialVersionUID = -1502505888265346945L;

	private Long id;

	private String orderSn;

	private Long doctorId;

	private String doctor;

	private Long userId;

	private Long addressId;

	private String addressPhone;

	private String addressConsignee;

	private Long addressDetail;

	private Long storeId;

	private Long planId;

	private String prescription;

	private Byte visible;

	private BigDecimal billingMoney;

	private BigDecimal serviceMoney;

	private BigDecimal drugMoney;

	private Byte quantity;

	private BigDecimal totalMoney;

	private BigDecimal logisticsFee;

	private Long payId;

	private String payChannel;

	private String payCode;

	private LocalDateTime payTime;

	private LocalDateTime deliveryTime;

	private LocalDateTime finishedTime;

	private Byte orderStatus;

	private Byte evalStatus;

	private String remark;

	private String cancelReason;

	private LocalDateTime createTime;

	private LocalDateTime updateTime;

	private Boolean hasExpired;

	private String leftTime;
	
	// 订单条目
	private List<OrderItem> orderItems = new ArrayList<>();

	public Long getDoctorId() {
		return doctorId;
	}

	public Long getAddressId() {
		return addressId;
	}

	public Long getId() {
		return id;
	}

	public Long getUserId() {
		return userId;
	}

	public Long getAddressDetail() {
		return addressDetail;
	}

	public Long getStoreId() {
		return storeId;
	}

	public String getAddressConsignee() {
		return addressConsignee;
	}

	public String getDoctor() {
		return doctor;
	}

	public Byte getVisible() {
		return visible;
	}

	public Long getPlanId() {
		return planId;
	}

	public String getAddressPhone() {
		return addressPhone;
	}

	public String getOrderSn() {
		return orderSn;
	}

	public void setAddressConsignee(String addressConsignee) {
		this.addressConsignee = addressConsignee;
	}

	public BigDecimal getBillingMoney() {
		return billingMoney;
	}

	public String getPrescription() {
		return prescription;
	}

	public BigDecimal getDrugMoney() {
		return drugMoney;
	}

	public BigDecimal getServiceMoney() {
		return serviceMoney;
	}

	public BigDecimal getLogisticsFee() {
		return logisticsFee;
	}

	public void setAddressDetail(Long addressDetail) {
		this.addressDetail = addressDetail;
	}

	public void setAddressId(Long addressId) {
		this.addressId = addressId;
	}

	public void setAddressPhone(String addressPhone) {
		this.addressPhone = addressPhone;
	}

	public void setBillingMoney(BigDecimal billingMoney) {
		this.billingMoney = billingMoney;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setDoctor(String doctor) {
		this.doctor = doctor;
	}

	public void setDoctorId(Long doctorId) {
		this.doctorId = doctorId;
	}

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setDrugMoney(BigDecimal drugMoney) {
		this.drugMoney = drugMoney;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}

	public void setPlanId(Long planId) {
		this.planId = planId;
	}

	public Long getPayId() {
		return payId;
	}

	public void setPrescription(String prescription) {
		this.prescription = prescription;
	}

	public void setServiceMoney(BigDecimal serviceMoney) {
		this.serviceMoney = serviceMoney;
	}

	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}

	public void setLogisticsFee(BigDecimal logisticsFee) {
		this.logisticsFee = logisticsFee;
	}

	public String getPayChannel() {
		return payChannel;
	}

	public void setPayChannel(String payChannel) {
		this.payChannel = payChannel;
	}

	public void setQuantity(Byte quantity) {
		this.quantity = quantity;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public void setVisible(Byte visible) {
		this.visible = visible;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public void setPayId(Long payId) {
		this.payId = payId;
	}

	public String getPayCode() {
		return payCode;
	}

	public void setPayCode(String payCode) {
		this.payCode = payCode;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	public Byte getEvalStatus() {
		return evalStatus;
	}

	public LocalDateTime getDeliveryTime() {
		return deliveryTime;
	}

	public Byte getOrderStatus() {
		return orderStatus;
	}

	public LocalDateTime getFinishedTime() {
		return finishedTime;
	}

	public LocalDateTime getPayTime() {
		return payTime;
	}

	public List<OrderItem> getOrderItems() {
		return orderItems;
	}

	public void setDeliveryTime(LocalDateTime deliveryTime) {
		this.deliveryTime = deliveryTime;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public String getCancelReason() {
		return cancelReason;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public String getRemark() {
		return remark;
	}

	public String getLeftTime() {
		return leftTime;
	}

	public void setPayTime(LocalDateTime payTime) {
		this.payTime = payTime;
	}

	public void setCancelReason(String cancelReason) {
		this.cancelReason = cancelReason;
	}

	public void setEvalStatus(Byte evalStatus) {
		this.evalStatus = evalStatus;
	}

	public void setFinishedTime(LocalDateTime finishedTime) {
		this.finishedTime = finishedTime;
	}

	public void setHasExpired(Boolean hasExpired) {
		this.hasExpired = hasExpired;
	}

	public void setLeftTime(String leftTime) {
		this.leftTime = leftTime;
	}

	public void setOrderItems(List<OrderItem> orderItems) {
		this.orderItems = orderItems;
	}

	public void setOrderStatus(Byte orderStatus) {
		this.orderStatus = orderStatus;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Boolean getHasExpired() {
//		if(this.hasExpired == null){
//			this.hasExpired = DateUtils.compare(this.getCreateTime().toString(), DateUtils.getTheDayBeforeNow(30).toString()) > 1;
//		}
		return hasExpired;
	}

	public void addOrderItems(OrderItem orderItem){
		this.orderItems.add(orderItem);
	}

}
